# -*- coding: utf-8 -*-
from django.shortcuts import render
from django.views.generic import TemplateView

from blog.models import Blog
# Create your views here.


class index(TemplateView):
    def get(self, request):
        result = Blog.objects.all().order_by('-id')[:10]
        return render(request, 'index.html', locals())